{#<!DOCTYPE html>#}
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <title>ONEPIECE-后台管理</title>
    <link href="{{ url_for('static',filename="images/qq.bmp") }}"  rel="icon" type="image/x-ico">
  <link rel="stylesheet" href="{{ url_for('static',filename='layui/css/layui.css') }}">
</head>
<body>
<div class="layui-layout layui-layout-admin">
  <div class="layui-header">
    <div class="layui-logo">  ONEPIECE-个人博客</div>
    <!-- 头部区域（可配合layui 已有的水平导航） -->
    <ul class="layui-nav layui-layout-left">
      <li class="layui-nav-item"><a href="">在线客服</a></li>
    </ul>
    <ul class="layui-nav layui-layout-right">
      <li class="layui-nav-item">
        <a href="javascript:;">
          <img src="{{ url_for('static',filename='images/qq.bmp') }}" class="layui-nav-img">
          管理员
        </a>
        <dl class="layui-nav-child">
          <dd><a href="">个人中心</a></dd>
          <dd><a href="">修改密码</a></dd>
        </dl>
      </li>
      <li class="layui-nav-item"><a href="javascript:exit()">退出系统</a></li>
    </ul>
  </div>

  <div class="layui-side layui-bg-black">
    <div class="layui-side-scroll">
      <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
      <ul class="layui-nav layui-nav-tree"  lay-filter="test">
        <li class="layui-nav-item layui-nav-itemed">
          <a class="" href="javascript:;"><span class="layui-icon layui-icon-template-1"></span> 文章管理</a>
          <dl class="layui-nav-child">
            <dd ><a href="/backstage/articleList" target="mainFrame"><span class="layui-icon layui-icon-read "></span> 文章列表</a></dd>
               <dd ><a href="/backstage/articleAdd" target="mainFrame"><span class="layui-icon layui-icon-edit "></span> 增加文章</a></dd>
              <dd><a href="/analysis" target="mainFrame"><span class="layui-icon layui-icon-list"></span> 统计分析</a></dd>
          </dl>
        </li>
        <li class="layui-nav-item">
          <a href="javascript:;">分类管理</a>
          <dl class="layui-nav-child">
            <dd><a href="typeList" target="mainFrame">分类列表</a></dd>
          </dl>
        </li>
{#          <li class="layui-nav-item">#}
{#          <a href="javascript:;">高校管理</a>#}
{#          <dl class="layui-nav-child">#}
{#            <dd><a href="univList" target="mainFrame">大学排名</a></dd>#}
{#            <dd><a href="javascript:;">统计分析</a></dd>#}
{#          </dl>#}
{#        </li>#}
{#        <li class="layui-nav-item"><a href="javascript:;">menu item 123</a></li>#}
{#        <li class="layui-nav-item"><a href="">the links</a></li>#}
      </ul>
    </div>
  </div>

  <div class="layui-body">
    <!-- 内容主体区域 -->
    <div style="padding: 15px;">
{#        innerframe#}
        <iframe name="mainFrame" src="/backstage/welcome"  width="100%" height="600px" frameborder="0">

        </iframe>
    </div>
  </div>

  <div class="layui-footer">
    <!-- 底部固定区域 -->
    &copy;2021-2022 Copy Right
  </div>
</div>
<script src="{{ url_for('static',filename='jquery/jquery-3.5.1.min.js') }}"></script>
<script src="{{ url_for('static',filename='layui/layui.js') }}"></script>
<script>
    function exit(){
        layer.alert("是否退出系统?",{
            closeBtn:1,
            anim:2,
            icon:1,
            btn:["确定","取消"],
            yes:function (){
                sessionStorage.clear()
                window.location.href="/"
            },
            btn2:function (){

            }
        })
    }
//JavaScript代码区域
layui.use(['element',"util"], function(){
  var element = layui.element;
  var util=layui.util
    //固定块
  util.fixbar({
    bar1: "说"
    ,bar2: false
    ,css: {right: 50, bottom: 100}
    ,bgcolor: '#FF0000'
    ,click: function(type){
      if(type === 'bar1'){
        layer.msg('您请说：')
        $.ajax({
            url:"/say",
            success:function (result){
                  layer.msg(result)
            },
            error:function (e){
                layer.msg('请求服务器失败！')
            }
        });
      } //else if(type === 'bar2') {
       // layer.msg('两个 bar 都可以设定是否开启')
     // }
    }
  });
});
</script>
</body>
</html>